#include "trap.h"
#include "instr_def.h"
#include "instr_test.h"
    .set noreorder
    .set noat
    .globl main
    .text
main:
    li $k1, 0x0
    # HI 1
    li $s1, 0x0
    nop
    nop
    HI_TEST(0x12345678, 0x12345678)
    nop
    nop
    HI_TEST(0x7fffffff, 0x7fffffff)
    nop
    nop
    HI_TEST(0xacacacac, 0xacacacac)
    nop
    nop
    HI_TEST(0xbdbdbdac, 0xbdbdbdac)
    nop
    nop
    HI_TEST(0x66666666, 0x66666666)
    nop
    nop
    HI_TEST(0xffffffff, 0xffffffff)
    nop
    nop
    HI_TEST(0x80000000, 0x80000000)
    nop
    nop
    HI_TEST(0x9428bebe, 0x9428bebe)
    nop
    nop
    HI_TEST(0xaabbcc64, 0xaabbcc64)
    nop
    nop
    HI_TEST(0x00000000, 0x00000000)
    nop
    nop
    li $k1, 0x1
    # LO 2
    li $s1, 0x0
    nop
    nop
    LO_TEST(0x12345678, 0x12345678)
    nop
    nop
    LO_TEST(0x7fffffff, 0x7fffffff)
    nop
    nop
    LO_TEST(0xacacacac, 0xacacacac)
    nop
    nop
    LO_TEST(0xbdbdbdac, 0xbdbdbdac)
    nop
    nop
    LO_TEST(0x66666666, 0x66666666)
    nop
    nop
    LO_TEST(0xffffffff, 0xffffffff)
    nop
    nop
    LO_TEST(0x80000000, 0x80000000)
    nop
    nop
    LO_TEST(0x9428bebe, 0x9428bebe)
    nop
    nop
    LO_TEST(0xaabbcc64, 0xaabbcc64)
    nop
    nop
    LO_TEST(0x00000000, 0x00000000)
    nop
    nop    
    li $k1, 0x12345678
    HIT_GOOD_TRAP		# stop temu
    
res_error: 
    li $s1, 0x11111111
    HIT_BAD_TRAP		# stop temu